<%-- 
    Document   : AllNXB
    Created on : Jun 15, 2013, 12:39:48 AM
    Author     : quannq
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<div id="comment-box">
    <input style="margin-bottom: -3px;" type="button"
           class="button-primary" value="Thêm NXB"
           onclick="modalFormAdd('addnhaxuatban');"/>
</div>
<br>
<table cellpadding="0" cellspacing="0" border="1" class="display example"
       style="color: black; width: 1000px;">
    <thead align="center">
        <tr>
            <th>ID</th>
            <th>Tên</th>
            <th>List Sách</th>
            <th>Số Sách</th>
        </tr>
    </thead>
    <tbody align="center">
        <c:if test="${fn:length(nhaxuatbans) == 0}">
            <tr class="gradeX">
                <td>No data</td>
            </tr>
        </c:if>

        <c:if test="${fn:length(nhaxuatbans) > 0}">
            <c:forEach items="${nhaxuatbans}" var="nhaxuatban">
                <tr class="gradeX">
                    <td>${nhaxuatban.manxb}</td>
                    <td><a href="javascript:modalFormUpdate('infonhaxuatban',${nhaxuatban.manxb});">${nhaxuatban.tennxb}</a></td>
                    <td><img src="${pageContext.request.contextPath}/image/admin/view.png" 
                             onclick="loadList('sach', 'listsachnxb',${nhaxuatban.manxb});"/></td>
                    <td>${fn:length(nhaxuatban.sachs)}</td>
<!--                    <td><c:if test="${fn:length(nhaxuatban.sachs)==0}">
                            <img src="${pageContext.request.contextPath}/image/admin/delete.png" />
                        </c:if>
                    </td>-->
                </tr>
            </c:forEach>
        </c:if>
    </tbody>
</table>
<div id="sach" style="margin-top: 100px"></div>